//
//  YbscVC+UI.swift
//  Auscultation
//
//  Created by 来 on 2021/1/20.
//

import Foundation

extension YbscVC {
    
    func initUI() {
        
        let top_view = UIImageView.init(image: #imageLiteral(resourceName: "beijing2@1.5x"))
        top_view.isUserInteractionEnabled = true
        view.addSubview(top_view)
        top_view.snp.makeConstraints { (make) in
            make.top.left.right.equalToSuperview()
            make.height.equalTo(UIDevice.lgf_NavBarH())
        }
        self.navTitle = "详情"
        self.rightText = "重新绑定  "
        self.lgf_NavigationBar.style.lgf_TitleColor = UIColor.white
        self.lgf_NavigationBar.style.lgf_RightBtnTitleColor = UIColor.white
        self.lgf_NavigationBar.lgf_Reload()
        
        scrollView = UIScrollView.lgf_Table("FFFFFF")
        if #available(iOS 11.0, *) {
            scrollView.contentInsetAdjustmentBehavior = .never
        } else {
            self.automaticallyAdjustsScrollViewInsets = false
        }
        view.addSubview(scrollView)
        scrollView.snp.makeConstraints { (make) in
            make.top.equalTo(top_view.snp.bottom)
            make.left.right.bottom.equalToSuperview()
        }
        
        xm = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "姓名", text: "", false)
        scrollView.addSubview(xm)
        xm.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalToSuperview().offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let xm_l = UILabel.init()
        xm_l.text = "姓名"
        xm_l.textColor = UIColor.init(lgf_HexString: "222222")
        xm_l.font = UIFont.boldSystemFont(ofSize: 16)
        xm.addSubview(xm_l)
        xm_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        xb = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "性别", text: "", false)
        scrollView.addSubview(xb)
        xb.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(xm.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let xb_l = UILabel.init()
        xb_l.text = "性别"
        xb_l.textColor = UIColor.init(lgf_HexString: "222222")
        xb_l.font = UIFont.boldSystemFont(ofSize: 16)
        xb.addSubview(xb_l)
        xb_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        csrq = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "出生日期", text: "", false)
        scrollView.addSubview(csrq)
        csrq.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(xb.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let csrq_l = UILabel.init()
        csrq_l.text = "出生日期"
        csrq_l.textColor = UIColor.init(lgf_HexString: "222222")
        csrq_l.font = UIFont.boldSystemFont(ofSize: 16)
        csrq.addSubview(csrq_l)
        csrq_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        sg = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "身高", text: "", false)
        scrollView.addSubview(sg)
        sg.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(csrq.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let sg_l = UILabel.init()
        sg_l.text = "身高(cm)"
        sg_l.textColor = UIColor.init(lgf_HexString: "222222")
        sg_l.font = UIFont.boldSystemFont(ofSize: 16)
        sg.addSubview(sg_l)
        sg_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        tz = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "体重", text: "", false)
        scrollView.addSubview(tz)
        tz.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(sg.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let tz_l = UILabel.init()
        tz_l.text = "体重(kg)"
        tz_l.textColor = UIColor.init(lgf_HexString: "222222")
        tz_l.font = UIFont.boldSystemFont(ofSize: 16)
        tz.addSubview(tz_l)
        tz_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        dq = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "地区", text: "", false)
        scrollView.addSubview(dq)
        dq.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(tz.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let dq_l = UILabel.init()
        dq_l.text = "地区"
        dq_l.textColor = UIColor.init(lgf_HexString: "222222")
        dq_l.font = UIFont.boldSystemFont(ofSize: 16)
        dq.addSubview(dq_l)
        dq_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        xxdz = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "详细地址", text: "", false)
        scrollView.addSubview(xxdz)
        xxdz.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(dq.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let xxdz_l = UILabel.init()
        xxdz_l.text = "详细地址"
        xxdz_l.textColor = UIColor.init(lgf_HexString: "222222")
        xxdz_l.font = UIFont.boldSystemFont(ofSize: 16)
        xxdz.addSubview(xxdz_l)
        xxdz_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        sjh = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "手机号", text: "", false)
        scrollView.addSubview(sjh)
        sjh.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(xxdz.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let sjh_l = UILabel.init()
        sjh_l.text = "手机号"
        sjh_l.textColor = UIColor.init(lgf_HexString: "222222")
        sjh_l.font = UIFont.boldSystemFont(ofSize: 16)
        sjh.addSubview(sjh_l)
        sjh_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        sfz = LGFLoginImageTitleView.init(nil, nil, left: 80, placeholder: "身份证", text: "", false)
        scrollView.addSubview(sfz)
        sfz.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-30)
            make.centerX.equalToSuperview()
            make.top.equalTo(sjh.snp.bottom).offset(10)
            make.height.equalTo(44.lgf_H())
        }
        let sfz_l = UILabel.init()
        sfz_l.text = "身份证"
        sfz_l.textColor = UIColor.init(lgf_HexString: "222222")
        sfz_l.font = UIFont.boldSystemFont(ofSize: 16)
        sfz.addSubview(sfz_l)
        sfz_l.snp.makeConstraints { (make) in
            make.left.equalToSuperview()
            make.top.bottom.equalToSuperview()
        }
        
        let button1 = UIButton.init(type: .custom)
        button1.backgroundColor = UIColor.init(lgf_HexString: EWEDarkMode.c_0F88F2)!
        button1.setTitle("上传", for: .normal)
        button1.setTitleColor(EWEDarkMode.white(), for: .normal)
        button1.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        button1.layer.cornerRadius = 4
        button1.layer.masksToBounds = true
        button1.addTarget(self, action: #selector(YbscVC.s_sc(_:)), for: .touchUpInside)
        scrollView.addSubview(button1)
        button1.snp.makeConstraints { (make) in
            make.top.equalTo(sfz.snp.bottom).offset(40)
            make.centerX.equalToSuperview()
            make.width.equalToSuperview().offset(-75)
            make.height.equalTo(50)
        }
       
        scrollView.lgf_AutoContentSize(50)
        
    }

}
